﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSConsoleTest
{
    class TestFormatting : BaseConsoleTest
    {
        public void printDescription()
        {
            Console.WriteLine("--- Formatting ---");
        }

        public void doTest()
        {
            int value = 156;
            Console.WriteLine("Decimal : {0}", value);
            Console.WriteLine("five figures Decimal : {0:D5}", value);
            Console.WriteLine("five figures Hexadecimal : 0x{0:X5}", value);

            StringBuilder builder = new StringBuilder();
            builder.AppendFormat("{0} + {1} = {2:D5}", 3, 5, 3 + 5);
        }
    }
}
